package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class GoTiXianMethods extends BaseMethods {

    private static GoTiXianMethods m_ins = null;

    public static GoTiXianMethods getInstance() {
        if (m_ins == null) {
            synchronized (GoTiXianMethods.class) {
                if (m_ins == null) {
                    m_ins = new GoTiXianMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Personal/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void encashemnt(Subscriber<Object> subscriber,
                      int mobile,
                      String checktype ,String alipay,String name ,String money ) {
        Observable observable = initService().encashemnt(System.currentTimeMillis()+"",
                "e604085cea4f97513ef89eee26f0e754",mobile,checktype,alipay,name,money
        );
        toSubscribe(observable, subscriber);
    }
}
